﻿Public Class frmCalendar

    Private Sub frmCalendar_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        With dgvWeek
            For i = 0 To 20
                .Rows.Add()
                .Rows(i).Height = 30
            Next
            .CellBorderStyle = DataGridViewCellBorderStyle.Sunken
            .BorderStyle = BorderStyle.Fixed3D
        End With

    End Sub

    Private Sub dgvWeek_CellDoubleClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles dgvWeek.CellMouseDoubleClick
        Dim frm1 As New frmEditCalendar

        If (frm1.ShowDialog() = Windows.Forms.DialogResult.OK) Then

        End If

    End Sub

    Private Sub dgvWeek_CellRightMouseClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles dgvWeek.CellMouseUp
        If (e.Button = Windows.Forms.MouseButtons.Right And e.RowIndex > -1 And e.ColumnIndex > -1) Then
            dgvWeek.CurrentCell = dgvWeek.Rows(e.RowIndex).Cells(e.ColumnIndex)
            ' set it as current cell
            dgvWeek.CurrentCell.Selected = True
        End If
    End Sub

    Private Sub TableLayoutPanel1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles TableLayoutPanel1.Paint

    End Sub

    Private Sub TableLayoutPanel2_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs)

    End Sub

    Private Sub TableLayoutPanel2_Paint_1(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs)

    End Sub

    Private Sub ContextMenuStrip1_Opening(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles CalendarRclick.Opening

    End Sub

    Private Sub dgvWeek_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvWeek.CellContentClick

    End Sub
End Class
